// pages/about_us/about_us.js
const app = getApp();
var router = require("../../router.js");
var WxParse = require('../../wxParse/wxParse.js');
Page({

  /**
   * 页面的初始数据
   */
  data: {
  
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    console.log(options);
    this.setData({
      id: options.id,
      infoType: options.type
    });  
  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {
    var that = this;
    app.request({
      url: router.system.info,
      method: "POST",
      data: {
        id: that.data.id,
        infoType: that.data.infoType
      },
      success: function (data) {
        console.log(data);
        that.setData({
          title: data.title,
          add_time: data.add_time,
          banner: data.banner,
        });
        //return false;
        WxParse.wxParse('article', 'html', data.content, that, 5);
      }
    })
  }
})